﻿<Window x:Class="Adan.Client.Dialogs.SubstitutionEditDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" ResizeMode="NoResize" 
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterOwner" 
        WindowStyle="ToolWindow" 
        Width="485"
        Height="200"        
        Title="Substitution editor"
        Style="{StaticResource DefaultWindowStyle}">
    <Grid Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <Label>Pattern:</Label>
            <TextBox Text="{Binding Path=Pattern}" />
            <Label>Substitute with:</Label>
            <TextBox Text="{Binding Path=SubstituteWith}" />            
            <Label  Padding="5">Group name:</Label>
            <ComboBox Padding="5" Width="150" ItemsSource="{Binding Path=AllGroups}" DisplayMemberPath="Name" SelectedValue="{Binding Path=SubstitutionGroup}" HorizontalAlignment="Left" />
        </StackPanel>
        <CheckBox Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5,0,0,0" IsChecked="{Binding Path=IsRegExp}">
            IsRegExp
        </CheckBox>
        <StackPanel HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Margin="0,5,0,0">
            <Button HorizontalAlignment="Right" IsDefault="True" MinWidth="50" Click="HandleOkClicked">Ok</Button>
            <Button HorizontalAlignment="Right" Margin="5,0,0,0" MinWidth="50" Click="HandleCancelClicked">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>

